﻿<?php

	require_once("Member.class.php");
	require_once("DB.inc.php");
	
	$id = $_POST['id'];
	$password2 = $_POST['password'];
	$mode = $_GET['mode'];
	$key = $_GET['key'];
	
	$password = sha1($password2);
	$member = new Member();
	
	if ($mode == "view") {
		$member->view($key);
	} elseif ($mode == "edit") {
		$member->editForm($key);
	} elseif ($mode == "editView") {
		$password2 = $_POST['password'];
		$password = sha1($password2);
		$username = $_POST['username'];
		$email = $_POST['email'];
		$nickname = $_POST['nickname'];
		$member->edit($key, $password, $username, $nickname, $email);
	} elseif ($mode == "delete"){
		$member->delete($key);
	} else {
		$member->display($id, $password);
	}
?>
<html>
	<head>
	</head>
	<body>
		<form name="input" action="loginForm.php" method="post">
			<input type="submit" value="로그인 하러 가기" />
		</form>
	</body>
</html>
